<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>台球厅管理系统登陆页面</TITLE>

<LINK href="SOURCE/images/Default.css" type=text/css rel=stylesheet>
<LINK href="SOURCE/images/xtree.css" type=text/css rel=stylesheet>
<LINK href="SOURCE/images/User_Login.css" type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
		<script type="text/javascript">
		function emptyVerify(){
			if(document.getElementById("TxtUserName").value == ''){
				
				return false;
			}
			if(document.getElementById("TxtPassword").value == ''){
				
				return false;
			}
			
			if(document.getElementById("verifycodeid").value == ''){
				
				return false;
			}
			return true;
		}

		function reloadcode(){
			var verify=document.getElementById('verifycodePic');
			verify.setAttribute('src','/billiardsbar/VerifyCode?'+Math.random());
		}
	</script>

</HEAD>
<BODY id=userlogin_body>
<%
			String username = "";
			String al = (String) request.getAttribute("errors");//+(String) request.getAttribute("username")+(String) request.getAttribute("password");
			
			Cookie cookie[] = request.getCookies();
			if(cookie !=null){
				for(int i=0;i<cookie.length;i++){
					if(cookie[i].getName().equals("username")){
						username = cookie[i].getValue();
					}
				}
			}
			if (al != null) {
				out.println("<font color='red'><ul>");
				out.println("<li>" + al + "</li>");
				out.println("</ul></font>");
			} 	
			
%>

<FORM action="LoginServlet" method="post" id="loginform" name="fromoflogin">
<DIV></DIV>

<DIV id=user_login>
<DL>
  <DD id=user_top>
  <UL>
    <LI class=user_top_l></LI>
    <LI class=user_top_c></LI>
    <LI class=user_top_r></LI></UL>
  <DD id=user_main>
  <UL>
    <LI class=user_main_l></LI>
    <LI class=user_main_c>
    <DIV class=user_main_box>
    <UL>
      <LI class=user_main_text>用户名：</LI>
      <LI class=user_main_input><INPUT class=TxtUserNameCssClass id=TxtUserName maxLength=20 name="txtUserName" value="<%=username%>"/> </LI></UL>
    <UL>
      <LI class=user_main_text>密码：</LI>
      <LI class=user_main_input><INPUT class=TxtPasswordCssClass id=TxtPassword maxLength=20
      type=password name="txtPassword"> </LI></UL>
    <UL>
      <LI class=user_main_text>验证码：
      <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="remeber"> </LI>
      <LI class=user_main_input>
      <input id="verifycodeid" name="verifycode" class=TxtValidateCodeCssClass maxLength=20>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img id="verifycodePic" src="/billiardsbar/VerifyCode" onClick="reloadcode();">
      <br>记住用户名
	</LI></UL></DIV></LI>
      
    <LI class=user_main_r><INPUT class=IbtnEnterCssClass id=IbtnEnter 
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
    onClick="return emptyVerify();" type=image src="SOURCE/images/user_botton.gif" name=IbtnEnter> </LI></UL>
  <DD id=user_bottom>
  <UL>
    <LI class=user_bottom_l></LI>
    <LI class=user_bottom_c><SPAN style="MARGIN-TOP: 40px">如果您还没有注册成为管理员，请点此 <A 
    href="userreg.jsp">注册</A> 。</SPAN> </LI>
    <LI class=user_bottom_r></LI></UL></DD></DL></DIV><SPAN id=ValrUserName 
style="DISPLAY: none; COLOR: red"></SPAN><SPAN id=ValrPassword 
style="DISPLAY: none; COLOR: red"></SPAN><SPAN id=ValrValidateCode 
style="DISPLAY: none; COLOR: red"></SPAN>
<DIV id=ValidationSummary1 style="DISPLAY: none; COLOR: red"></DIV>

<DIV></DIV>

</FORM></BODY></HTML>
